<?php
namespace console\controller;

use biu\controller\ConsoleController;
use biu\handler\Error;
use biu\lib\Log;
use console\model\User;
use Curl\Curl;

class CurlController extends ConsoleController
{

    public function actionTest(){



        $curl = new Curl();
        $headers = $curl->get('http://www.baidu.com')->response_headers;
        #print_r($headers);
        Log::info($headers);

    }


    /**
     * D:\code\php\git-demo>php biu.php curl/1 aaa bbb
    Array
    (
    [0] => aaa
    [1] => bbb
    )

     *
     *
     * @param $p1
     * @param $p2
     */
    public function action1($p1,$p2){

        #require 'a';
        1/0;

        print_r(func_get_args());

    }


    /**
     *
     *
     *
     * @multi 3 int 开启多线程，常驻进程
     * @param $p1
     * @param $p2
     */
    public function action2($p1,$p2){

        $user = new User();
        $user->save();
    }
    public function action3($p1,$p2){
        $e = null;
        #var_dump(is_scalar($e));
        var_dump(\Biu::$home);
    }
    public function action4($p1,$p2){
        Log::err('test','curl');
    }

}